package com.xiaomi.eco.dal.query;

public enum ApiErrorCode {

    /**
     * 成功
     */
    success(200, "成功"),

    /*** 400以上错误提示信息*/
    token_invalid(401, "登录过期"),

    error_lack_permission(403, "缺少访问权限"),

    exist(405, "已存在"),

    error_user_code_miss(409, "用户不存在"),

    error_username(410, "用户名或密码错误"),

    error_user_is_locked(411, "用户已被锁定"),
    code_invalid(412, "验证码过期"),
    code_error(413, "验证码错误"),
    /* 错误码为500以上是不显示的信息，系统逻辑有误 */
    parameter_missing(510, "缺少参数/或为空"),

    /**
     * 服务器异常
     */
    server_exception(500, "服务器异常"),



    // =====================预算预测异常=========================
    bf_excel_executor_not_found(10001, "执行异常"),


    ;


    private int code;
    private String zh_message;


    private ApiErrorCode(int code, String zh_message) {
        this.code = code;
        this.zh_message = zh_message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return zh_message;
    }


}
